<?php
class Profesional extends Appmodel{

	
	var $name = 'Profesional';
	
	
	function getProfesionales(){

		return $this->find('all', array(
				'conditions' => array('Profesional.estado' => 1)
		)
		);
		
	}
	
	
	//Asociaciones del Modelo
	var $belongsTo = array(
		'Persona' => array(
			'className' => 'Persona',
			'foreignKey' => 'persona_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		)
	);

	
	var $hasAndBelongsToMany = array("Prevision");
	
	
	
	var $hasMany = array(

		'ProfesionalEspecialidad' => array(
			'className' => 'ProfesionalEspecialidad',
			'foreignKey' => 'profesional_id',
			'dependent' => false,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'exclusive' => '',
			'finderQuery' => '',
			'counterQuery' => ''
		)
		,
		'ProfesionalServicio' => array(
			'className' => 'ProfesionalServicio',
			'foreignKey' => 'profesional_id',
			'dependent' => false,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'exclusive' => '',
			'finderQuery' => '',
			'counterQuery' => ''
		)
	);
	
	
	
}



?>